package org.xu.bo;

import lombok.Data;
import org.xu.enums.YearlyInspectStatusEnum;

import java.util.HashMap;
import java.util.Map;

@Data
public class ExcelBO {

    private String apply_no;
    private String vin;
    private String predict_annual_inspect_date;
    private String predict_scrap_date;
    private String yearly_status_name;
    private String annual_inspect_remark;

    private String yearly_status_code;
    private String trailer_vin;
    private String trailer_remark;

    public static Map<String,String> HEADER_ALIAS;

    static{
        //导出excel模板表头如下
        HEADER_ALIAS = new HashMap<>();
        HEADER_ALIAS.put("申请编号","apply_no");
        HEADER_ALIAS.put("车架号","vin");
        HEADER_ALIAS.put("预计年检有效日期","predict_annual_inspect_date");
        HEADER_ALIAS.put("预计报废日期","predict_scrap_date");
        HEADER_ALIAS.put("年检状态","yearly_status_name");
        HEADER_ALIAS.put("年检备注","annual_inspect_remark");
        HEADER_ALIAS.put("车挂车架号","trailer_vin");
        HEADER_ALIAS.put("车挂年检备注","trailer_remark");
    }

    public String getYearly_status_code() {
        YearlyInspectStatusEnum instance = YearlyInspectStatusEnum.getInstanceByName(this.yearly_status_name);
        return instance.getCode();
    }

}
